<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/head.jsp"%>
<div class="bjui-pageContent">
	<form action="${ctx}/sys/addQuesItemListOption.do" id="j_custom_form" data-toggle="ajaxform">
		<input type="hidden" value="${modifybean.id}" name="quesItemListId" />
		<div class="bjui-row col-2">

			<label class="row-label">问卷主题</label>
			<div class="row-input">${modifybean.item.ques.name}</div>
			<br />

			<label class="row-label">截至日期</label>
			<div class="row-input">${modifybean.item.ques.endDate}</div>
			<br />

			<label class="row-label">项目分类</label>
			<div class="row-input">${modifybean.item.name}</div>
			<br />


			<label class="row-label">题目</label>
			<div class="row-input" style="">${modifybean.question}</div>
			<br />

			<label class="row-label">题型</label>
			<div class="row-input">${modifybean.typesel}</div>
			<br />
			<c:if test="${modifybean.typesel!='填空' and modifybean.typesel!='文本'}">
				<label class="row-label">新选项</label>
				<div class="row-input">
					<input type="text" name="options" id="QuesItemListOption_options" value="" data-rule="required" size="60"
						autofocus="autofocus">
				</div>
				<br />
			</c:if>


		</div>
	</form>
	<c:if test="${modifybean.typesel!='填空' and modifybean.typesel!='文本'}">
		<table class="table table-bordered" data-toggle="tablefixed" data-width="100%" data-nowrap="true">
			<thead>
				<tr>
					<th>选项</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${list}" var="item">
					<tr data-id="${item.id }">
						<td>${item.options}</td>
						<td>
							<a href="${ctx}/sys/deleteQuesItemListOption.do?ids=${item.id}" class="btn btn-red" data-toggle="doajax"
								data-confirm-msg="确定要删除该行信息吗？">删除</a>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</c:if>

</div>
<div class="bjui-pageFooter">
	<ul>
		<c:if test="${modifybean.typesel!='填空' }">
			<li>
				<button type="button" class="btn-close" data-icon="close">取消</button>
			</li>
			<li>
				<button type="submit" class="btn-default" data-icon="save">添加题目选项</button>
			</li>
		</c:if>
	</ul>
</div>
<script type="text/javascript">
	$("#QuesItemList_item").val("${modifybean.item.id}");
	$("#QuesItemList_typesel").val("${modifybean.typesel}");
	$("#QuesItemListOption_options").focus();
</script>
